package vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.policies;

import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;

import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.commands.AbstractUIComponentCreateCommand;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.commands.ActivatorCreateCommand;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.commands.InputFieldCreateCommand;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.commands.MultipleChoiceCreateCommand;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.commands.NavigatorCreateCommand;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.commands.OutputFieldCreateCommand;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.edit.commands.SingleChoiceCreateCommand;
import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui.diagram.providers.AdaptedauiElementTypes;

/**
 * @generated
 */
public class PresentationUnitUIComponentCompartmentItemSemanticEditPolicy
		extends AdaptedauiBaseItemSemanticEditPolicy {

	/**
	 * @generated
	 */
	public PresentationUnitUIComponentCompartmentItemSemanticEditPolicy() {
		super(AdaptedauiElementTypes.PresentationUnit_2001);
	}

	/**
	 * @generated
	 */
	protected Command getCreateCommand(CreateElementRequest req) {
		if (AdaptedauiElementTypes.AbstractUIComponent_3001 == req
				.getElementType()) {
			return getGEFWrapper(new AbstractUIComponentCreateCommand(req));
		}
		if (AdaptedauiElementTypes.MultipleChoice_3002 == req.getElementType()) {
			return getGEFWrapper(new MultipleChoiceCreateCommand(req));
		}
		if (AdaptedauiElementTypes.InputField_3003 == req.getElementType()) {
			return getGEFWrapper(new InputFieldCreateCommand(req));
		}
		if (AdaptedauiElementTypes.OutputField_3004 == req.getElementType()) {
			return getGEFWrapper(new OutputFieldCreateCommand(req));
		}
		if (AdaptedauiElementTypes.Navigator_3005 == req.getElementType()) {
			return getGEFWrapper(new NavigatorCreateCommand(req));
		}
		if (AdaptedauiElementTypes.SingleChoice_3006 == req.getElementType()) {
			return getGEFWrapper(new SingleChoiceCreateCommand(req));
		}
		if (AdaptedauiElementTypes.Activator_3007 == req.getElementType()) {
			return getGEFWrapper(new ActivatorCreateCommand(req));
		}
		return super.getCreateCommand(req);
	}

}
